package com.ad.backstage.common.exception;

import com.ad.payload.enums.ResultCode;
import lombok.Getter;

/**
 * @author:dxgong
 * @日期 2021/3/10 20:42
 * @注释
 */
@Getter
public class BackStageRuntimeException extends RuntimeException {

    private int code;
    private String msg;

    public BackStageRuntimeException(){
        this(ResultCode.FAILED.getCode(), "操作错误");
    }


    public BackStageRuntimeException(String msg){
        this(ResultCode.FAILED.getCode(), msg);
    }

    public BackStageRuntimeException(int code, String msg){
        super(msg);
        this.code = code;
        this.msg = msg;
    }
}
